<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>留言本-${config.searchtitle }-第${pageList.pageNumber }页</title>
<meta name="keywords" content="${config.keywords }"/>
<meta name="description" content="${config.description }"/>
<jsp:include page="common/meta.jsp"/>
<script type="text/javascript" src="${js_ctx }/jquery-1.5.1.min.js"></script>
<script type="text/javascript">
  function addgbook(){
    var nickname = $("#nickname").val();if(nickname==""){ alert("昵称输入为空"); return; }
    var content = $("#content").val(); if(content==""){ alert("内容输入为空"); return; } $.ajax({type: "POST",url: "${ctx}/gbook_add.html", data: "nickname="+nickname+"&content="+content, success: function(html){alert(html);}});
	$("#content").val("");
  }
</script>
</head>
<body>
<div class="wrap">
  <jsp:include page="common/search.jsp"/>
  <div class="nav mb">
    <div class="ntop">
      <span class="l"></span>
      <span class="r"></span>
      <a href="/" class="index" target="_self">摆渡首页</a>
      <c:forEach items="${menuList}" var="menu"><a href="${ctx }/${menu.url }.html" title="${menu.cname }" target="_self">${menu.cname }</a></c:forEach>
    </div>
    <jsp:include page="common/nbottom.jsp"/>
  </div>
  <div class="leaveNavInfo"><h3><span id="adminleaveword"></span>摆渡影视留言板</h3></div>
  <div id="leaveword">
   <form id="gbook" action="${ctx }/gbook_add.html" method="post">
	  <table align="left" width="400px" style="margin:0 auto; margin-top: 30px">
	  <tbody>
	   <tr><td height="25" colspan="2">昵称：<input type="text" value="贴心网友" name="nickname" id="nickname" size="20"/> <span class="red">*</span></td></tr>
	   <tr><td width="550" colspan="2" valign="top">内容：<textarea cols="40" name="content" id="content" rows="5"></textarea> <span class="red">*</span></td></tr>
	   <tr><td height="30" colspan="2"><input type="button" id="addgbookb" value="提交留言" onclick="addgbook()" class="btn"/>　<input type="reset" value="重新留言" class="btn"/></td> </tr>
	  </tbody>
	  </table>
	  <table align="right" width="200px" style="margin:0 auto"><tbody><tr><td>
	  <jsp:include page="common/ad250.jsp"/>
	  </td> </tr></tbody></table>
   </form>
  </div>
  <div id="leavewordlist" align="center" style="display: inline;">
   <ul>
    <c:forEach items="${pageList.list}" var="gbook">
      <li class="topwords"><span><strong>${gbook.nickname }</strong> 发表于 ${gbook.addtime }</span>第${gbook.id }楼 </li><li class="words">${gbook.content }</li><c:if test="${!empty gbook.replay}"><li class="rewords"><em>回复内容:</em>${gbook.replay }</li></c:if>
    </c:forEach> 
   </ul>
   <div class="page mb"><span>共${ pageList.totalRow}条数据 页次:${pageList.pageNumber }/${ pageList.totalPage}页</span>
	  <em class="nolink">首页</em>
	  <c:if test="${pageList.pageNumber eq 1}"><em class="nolink">上一页</em></c:if><c:if test="${pageList.pageNumber ne 1}"><a href="${ctx}/gbook_${pageList.pageNumber-1 }.html">上一页</a></c:if>
	  <c:if test="${pageList.pageNumber lt pageList.totalPage}"><a href="${ctx}/gbook_${pageList.pageNumber+1 }.html">下一页</a></c:if><c:if test="${pageList.pageNumber eq pageList.totalPage}"><em class="nolink">下一页</em></c:if>
	  <c:if test="${pageList.pageNumber lt pageList.totalPage}"><a href="${ctx}/gbook_${pageList.pageNumber }.html">尾页</a></c:if><c:if test="${pageList.pageNumber eq pageList.totalPage}"><em class="nolink">尾页</em></c:if>
   </div>
  </div>
  <jsp:include page="common/bottom.jsp"/>
</div>
</body></html>